package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_stk_limit")
public class FStkLimit {
    @Id
    private Long tid;

    /**
     * 交易日期
     */
    @Column(name = "trade_date")
    private String tradeDate;

    /**
     * TS股票代码
     */
    @Column(name = "ts_code")
    private String tsCode;

    /**
     * 昨日收盘价
     */
    @Column(name = "pre_close")
    private Float preClose;

    /**
     * 涨停价
     */
    @Column(name = "up_limit")
    private Float upLimit;

    /**
     * 跌停价
     */
    @Column(name = "down_limit")
    private Float downLimit;

    public FStkLimit(Long tid, String tradeDate, String tsCode, Float preClose, Float upLimit, Float downLimit) {
        this.tid = tid;
        this.tradeDate = tradeDate;
        this.tsCode = tsCode;
        this.preClose = preClose;
        this.upLimit = upLimit;
        this.downLimit = downLimit;
    }

    public FStkLimit() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取交易日期
     *
     * @return trade_date - 交易日期
     */
    public String getTradeDate() {
        return tradeDate;
    }

    /**
     * 设置交易日期
     *
     * @param tradeDate 交易日期
     */
    public void setTradeDate(String tradeDate) {
        this.tradeDate = tradeDate;
    }

    /**
     * 获取TS股票代码
     *
     * @return ts_code - TS股票代码
     */
    public String getTsCode() {
        return tsCode;
    }

    /**
     * 设置TS股票代码
     *
     * @param tsCode TS股票代码
     */
    public void setTsCode(String tsCode) {
        this.tsCode = tsCode;
    }

    /**
     * 获取昨日收盘价
     *
     * @return pre_close - 昨日收盘价
     */
    public Float getPreClose() {
        return preClose;
    }

    /**
     * 设置昨日收盘价
     *
     * @param preClose 昨日收盘价
     */
    public void setPreClose(Float preClose) {
        this.preClose = preClose;
    }

    /**
     * 获取涨停价
     *
     * @return up_limit - 涨停价
     */
    public Float getUpLimit() {
        return upLimit;
    }

    /**
     * 设置涨停价
     *
     * @param upLimit 涨停价
     */
    public void setUpLimit(Float upLimit) {
        this.upLimit = upLimit;
    }

    /**
     * 获取跌停价
     *
     * @return down_limit - 跌停价
     */
    public Float getDownLimit() {
        return downLimit;
    }

    /**
     * 设置跌停价
     *
     * @param downLimit 跌停价
     */
    public void setDownLimit(Float downLimit) {
        this.downLimit = downLimit;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tradeDate=").append(tradeDate);
        sb.append(", tsCode=").append(tsCode);
        sb.append(", preClose=").append(preClose);
        sb.append(", upLimit=").append(upLimit);
        sb.append(", downLimit=").append(downLimit);
        sb.append("]");
        return sb.toString();
    }
}